<?
    /* -*- Mode: PHP5; tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- */
    
    /*********************************************************
    *            --== InArch ==--
    *
    * @author Kulikov Alexey <a.kulikov@gmail.com>
    * @version n/a
    * @since 08.08.2005
    * @copyright essentialmind.com 2005
    *
    *********************************************************/
    
    /***
    * Abstract Class installNodeContactform
    ****
    * This is the module installer/deinstaller, shall
    * automate integration of new modules into client
    * solutions
    ****
    * @package installNodes
    * @author A Kulikov <a.kulikov@gmail.com>
    * @version n/a
    * @since 08.08.2005
    * @copyright essentialmind.com 2005
    ***/
    class installNodeContactform extends installNode{
        
        /**
         * This is the node install script
         *
         */
        protected function create(){
            //create database table  
            $this->db->Execute("CREATE TABLE node_contactform(
                                    id SERIAL,
                                    mailto  VARCHAR(255),
                                    content TEXT,
                                    PRIMARY KEY(id)
                                )");
        }
        
        
        /**
         * This is the node uninstall script
         *
         */
        protected function remove(){
            //drop database table
            $this->db->Execute("DROP TABLE node_contactform");
        }
        
        
        /**
         * Sets the properties of this node
         *
         */
        protected function setProps(){
            $this->setDescription('A Contact Form');   
            $this->setAdminAdd(true);
            $this->setIsFolder(false);
        }
    }
?>